/**
 * Created with Interllij IDEA.
 * Descriptiption:
 * User: 王澄慧
 * Date: 2022-03-26
 * Time: 16:50
 */
public class FristDemo {
    public static void main(String[] args) {
            int sum = 0;
            for (int a = 0; a <= 100 ; a++) {
                if(a % 2 == 0){
                    sum += a;
                }
            }
            System.out.println(sum);
        }
    public static void main5(String[] args) {
        int sum = 0;
        for (int a = 0; a <= 100 ; a++) {
            if(a % 2 != 0){
                sum += a;
            }
        }
        System.out.println(sum);
    }
    public static void main4(String[] args) {
        int sum = 0;
        for (int a = 0; a <=100 ; a++) {
            sum += a;
        }
        System.out.println(sum);

    }
    public static void main3(String[] args) {
        int a = 1;
        while(a <= 100){
            if(a % 15 != 0){
                a++;
                continue;
            }
            System.out.println(a);
            a++;
        }
    }
    public static void main2(String[] args) {
        int a = 1;
        while(a <= 100){
            if(a % 15 == 0){
                System.out.println(a);
            }
            a++;
        }
    }
    public static void main1(String[] args) {
        int a = 1;
        while (a <= 100){
            if(a % 15 != 0){
                a++;
                continue;
            }
            System.out.println(a);
            a++;
        }
    }
}


